home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / DuchessLuynes.dxr / playing cards_62_f1.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.5 KB  |  60 lines

  1. property spriteNum, row, basecard
  2. global stock, foundation, equal, currentsel, getlist, godlist, basecard, leftlist, rightlist, mysuitb
  3.  
  4. on beginSprite me
  5.   row = determinerow()
  6.   basecard = "king"
  7. end
  8.  
  9. on determinerow me
  10.   if spriteNum = 29 then
  11.     return #fone
  12.   else
  13.     if spriteNum = 30 then
  14.       return #ftwo
  15.     else
  16.       if spriteNum = 31 then
  17.         return #fthree
  18.       else
  19.         if spriteNum = 32 then
  20.           return #ffour
  21.         end if
  22.       end if
  23.     end if
  24.   end if
  25. end
  26.  
  27. on mouseEnter me
  28.   if getlist <> VOID then
  29.     if foundation[row].getcardcount() = 0 then
  30.       if getlist.getlastcard().rank = basecard then
  31.         if not mysuitb.findPos(getlist.getlastcard().suit) then
  32.           equal = 1
  33.           currentsel = spriteNum - 4
  34.           godlist = foundation[row]
  35.         else
  36.           if (getlist = foundation[#fone]) or (getlist = foundation[#ftwo]) or (getlist = foundation[#fthree]) or (getlist = foundation[#ffour]) then
  37.             equal = 1
  38.             currentsel = spriteNum - 4
  39.             godlist = foundation[row]
  40.           end if
  41.         end if
  42.       end if
  43.     else
  44.       if foundation[row].getcardcount() > 0 then
  45.         if (getlist.getlastcard().rankvalue = (foundation[row].getlastcard().rankvalue - 1)) and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then
  46.           equal = 1
  47.           currentsel = spriteNum - 4
  48.           godlist = foundation[row]
  49.         end if
  50.       end if
  51.     end if
  52.   end if
  53. end
  54.  
  55. on mouseLeave me
  56.   equal = 0
  57.   currentsel = 0
  58.   godlist = VOID
  59. end
  60.